package com.caiyouxi.advertise.controller;

import com.caiyouxi.advertise.model.AdvertiseSlideBean;
import com.caiyouxi.advertise.service.AdvertiseSlideService;
import com.caiyouxi.common.bean.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/slide")
public class AdvertiseSlideController {
    @Autowired
    private AdvertiseSlideService advertiseSlideService;

    /**
     * 添加幻灯片
     * */
    @RequestMapping("/add_slide")
    public ResData add_slide(@RequestBody AdvertiseSlideBean bean){
        return advertiseSlideService.add_slide(bean);
    }

    /**
     * 删除幻灯片
     * */
    @RequestMapping("/delete_slide")
    public ResData delete_slide(@RequestBody AdvertiseSlideBean bean){
        return advertiseSlideService.delete_slide(bean);
    }

    /**
     * 修改
     * */
    @RequestMapping("/update_slide")
    public ResData update_slide(@RequestBody AdvertiseSlideBean bean){
        return advertiseSlideService.update_slide(bean);
    }

    /**
     * 修改状态
     * */
    @RequestMapping("/update_statues")
    public ResData update_statues(@RequestBody AdvertiseSlideBean bean){
        return advertiseSlideService.update_statues(bean);
    }

    /**
     * 查找幻灯片效果统计（广告效果统计）
     * */
    @RequestMapping("/get_advertise_slide")
    public ResData get_advertise_slide(@RequestBody AdvertiseSlideBean bean){
        return advertiseSlideService.get_advertise_slide(bean);
    }

    /**
     * 查看详情
     * */
    @RequestMapping("/get_slide_info")
    public ResData get_slide_info(@RequestBody AdvertiseSlideBean bean){
        return advertiseSlideService.get_slide_info(bean);
    }

}
